package core.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 示例代码，请勿改动。
 * @author zhangzhen
 *
 */
@Controller
public class CoreController {
	
	Log log = LogFactory.getLog(getClass());
	
	@RequestMapping("/welcome")
	public String welcome(String fname, Model model) {
		fname = fname.replaceAll("[,，。\\.\\?？\\s]", "");
		if("".equals(fname)) {
			;
		} else {
			fname += "，";
		}
		log.info(fname + "welcome");
		model.addAttribute("fname", fname);
		return "/index.jsp";
	}

}
